﻿using System;
using System.Management;

namespace cry
{
    internal class Util
    {
        public static string GetSystemInfo()
        {
            ManagementClass mangnmt = new ManagementClass("Win32_LogicalDisk");
            ManagementObjectCollection mcol = mangnmt.GetInstances();
            string dskInfo = "";
            foreach (ManagementObject strt in mcol)
            {
                dskInfo += Convert.ToString(strt["VolumeSerialNumber"]);
            }
            string cpuInfo = string.Empty;
            ManagementClass mc = new ManagementClass("win32_processor");
            ManagementObjectCollection moc = mc.GetInstances();
            foreach (ManagementObject mo in moc)
            {
                cpuInfo = mo.Properties["processorID"].Value.ToString();
                break;
            }
            return cpuInfo + dskInfo;
        }
    }
}